package cn.lxinet.lxms.system.mapper;

import cn.lxinet.lxms.framework.mybatis.mapper.BaseMapper;
import cn.lxinet.lxms.system.entity.SysUserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

@Mapper
public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {

    List<Long> queryRoleIds(Long userId);

    SysUserRole isAdministrator(Long userId);

    Set<Long> listRoleIdsByUserId(Long userId);

    void deleteByUserIdAndRoleId(@Param("userId") Long userId, @Param("roleId") Long roleId);
}
